package com.sojpt.boot.controller.business;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
import com.sojpt.boot.ui.iview.IViewController;
import com.sojpt.model.LkyApplyRecord;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * Description: 本类用于总管理查看通过记录
 * Created by SMW on 2020/2/17 14:59
 */
@RestController
@RequestMapping("/admin/applyAdminPage/")
public class LkyApplyAdminPassController extends IViewController {


    @GetMapping("list")
    public void list() {
        Map<String,String> map =new HashMap<>();
        map.put("mid",getPara("mid"));
        map.put("coid",getPara("coid"));
        map.put("mid",getPara("mid"));
        map.put("uid",getPara("uid"));
        LkyApplyRecord lkyApplyRecord  = getModel(LkyApplyRecord.class,"lkyApplyRecord");
        SqlPara sqlPara = Db.getSqlPara("lky_apply_admin.selectPass", map);
        Page<Record> page = Db.paginate(pageNumber(), pageSize(), sqlPara);
        renderJson(page);
    }
}
